package net.zcscloud.zhuohcun.zeco.dao;

import net.zcscloud.zhuohcun.zeco.common.dao.LogicDAO;
import net.zcscloud.zhuohcun.zeco.dto.VideotokenDTO;
import net.zcscloud.zhuohcun.zeco.entity.Videotoken;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import javax.transaction.Transactional;

public interface VideotokenDao extends LogicDAO<Videotoken,Long> {
    Videotoken findByValid(String name);
    @Modifying
    @Transactional
    @Query("UPDATE Videotoken SET valid = '0' WHERE valid = '1'")
    void setValid0();
    void save(VideotokenDTO videotokenDTO);
}